package com.zzw.springboot.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzw.springboot.bean.SysMenu;
import com.zzw.springboot.mapper.SysMenuMapper;
import com.zzw.springboot.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 赵志伟
 * @version 1.0
 */
@SuppressWarnings({"all"})
@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements SysMenuService  {
    @Autowired
    private SysMenuMapper menuMapper;

    @Override
    public List<SysMenu> listRootMenu() {
        return menuMapper.selectRootMenuList();
    }

    @Override
    public List<SysMenu> listChildMenu(Integer parentId) {
        return menuMapper.selectChildMenuList(parentId);
    }

    @Override
    public List<SysMenu> listChildNode(Integer parentId) {
        return menuMapper.selectChildNodeList(parentId);
    }

}
